package com.bloveoacom.weichi.contract;



import com.bloveoacom.http.HttpResult;
import com.bloveoacom.mvp.BasePresenter;
import com.bloveoacom.mvp.IModel;
import com.bloveoacom.mvp.IView;
import com.bloveoacom.weichi.bean.UserBean;

import io.reactivex.Flowable;

/**
 * author: zhu.px
 * e-mail: 1271901673@qq.com
 * time  : 2018/8/22
 * desc  : 我的
 */
public interface LoginContract {

    //页面V
    interface View extends IView {
            //登录以后的数据
            //获取验证码数据
            void loginSuccess(UserBean bean);
            void sendCode(String bean);
    }

    //数据M
    interface Model extends IModel {
        Flowable<HttpResult<Object>> login(String phone, String code);
        Flowable<HttpResult<String>> sendCode(String phone,int type);
    }

    //交互P
    abstract class Presenter extends BasePresenter<View, Model> {
        public abstract void login(String phone, String password);
        public abstract void sendCode(String phone, int type);
    }
}
